<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String name = request.getParameter("name");
    int age = Integer.parseInt(request.getParameter("age"));

    if (age > 18) {
        response.sendRedirect("welcome.jsp?name=" + name);
    } else {
        response.sendRedirect("forbid.jsp?name=" + name);
    }
%>
